(async () => {
  const response = await fetch("http://douyin.toloho.ltd/index.php/index/index/loginCheck", {
    headers: {
      "accept": "application/json, text/plain, */*",
      "accept-language": "zh-CN,zh;q=0.9",
      "content-type": "application/json;charset=UTF-8",
      "proxy-connection": "keep-alive"
    },
    referrer: "http://douyin.toloho.ltd/index.php/index/index/login.html",
    referrerPolicy: "strict-origin-when-cross-origin",
    body: JSON.stringify({ username: "rongkehong", password: "djs777888" }),
    method: "POST",
    mode: "cors",
    credentials: "include"  // 确保发送和接收 Cookie
  });
// username=rongkehong; logintoken=246f12d18ee70f06e89318c250ae48d8

console.log(response);

  // 获取 Set-Cookie 头
  const setCookieHeader = response.headers.get('Set-Cookie');
  console.log('Set-Cookie:', setCookieHeader);

  // 读取响应体
  const data = await response.json();
  console.log('Response:', data);
})();
